package com.ruoyi.base.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.base.domain.BaseTask;
import com.ruoyi.base.domain.BaseTaskInfo;
import com.ruoyi.base.mapper.BaseTaskInfoMapper;
import com.ruoyi.base.mapper.BaseTaskMapper;
import com.ruoyi.base.service.IBaseTaskInfoService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 出入库任务详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-14
 */
@Service
public class BaseTaskInfoServiceImpl extends ServiceImpl<BaseTaskInfoMapper, BaseTaskInfo> implements IBaseTaskInfoService
{
    @Autowired
    private BaseTaskInfoMapper baseTaskInfoMapper;

    /**
     * 查询出入库任务详情
     * 
     * @param id 出入库任务详情主键
     * @return 出入库任务详情
     */
    @Override
    public BaseTaskInfo selectBaseTaskInfoById(Long id)
    {
        return baseTaskInfoMapper.selectBaseTaskInfoById(id);
    }

    /**
     * 查询出入库任务详情列表
     * 
     * @param baseTaskInfo 出入库任务详情
     * @return 出入库任务详情
     */
    @Override
    public List<BaseTaskInfo> selectBaseTaskInfoList(BaseTaskInfo baseTaskInfo)
    {
        return baseTaskInfoMapper.selectBaseTaskInfoList(baseTaskInfo);
    }

    /**
     * 新增出入库任务详情
     * 
     * @param baseTaskInfo 出入库任务详情
     * @return 结果
     */
    @Override
    public int insertBaseTaskInfo(BaseTaskInfo baseTaskInfo)
    {
        baseTaskInfo.setCreateTime(DateUtils.getNowDate());
        return baseTaskInfoMapper.insertBaseTaskInfo(baseTaskInfo);
    }

    /**
     * 修改出入库任务详情
     * 
     * @param baseTaskInfo 出入库任务详情
     * @return 结果
     */
    @Override
    public int updateBaseTaskInfo(BaseTaskInfo baseTaskInfo)
    {
        baseTaskInfo.setUpdateTime(DateUtils.getNowDate());
        return baseTaskInfoMapper.updateBaseTaskInfo(baseTaskInfo);
    }

    /**
     * 批量删除出入库任务详情
     * 
     * @param ids 需要删除的出入库任务详情主键
     * @return 结果
     */
    @Override
    public int deleteBaseTaskInfoByIds(Long[] ids)
    {
        return baseTaskInfoMapper.deleteBaseTaskInfoByIds(ids);
    }

    /**
     * 删除出入库任务详情信息
     * 
     * @param id 出入库任务详情主键
     * @return 结果
     */
    @Override
    public int deleteBaseTaskInfoById(Long id)
    {
        return baseTaskInfoMapper.deleteBaseTaskInfoById(id);
    }
}
